package com.bwie.shop.mq;

import org.apache.commons.lang3.SerializationUtils;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 消费者
 *
 * @author <a href="mailto:3364114353@qq.com">liuwenliang</a>
 * @version 1.0
 * @description: 消费者
 * @date 2025/9/9 16:28
 */
@Component
public class ConsumerMessage {

    @Autowired
    private AmqpTemplate amqpTemplate;

    @RabbitListener(queues = "2301A")
    public void getMessage () {
        Message receive = amqpTemplate.receive("2301A");

        byte[] serialize = SerializationUtils.serialize(receive);


    }


}
